<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>常见网页布局</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .top {
            height: 50px;
            background-color: coral;
        }

        .banner {
            height: 150px;
            width: 980px;
            background-color: burlywood;
            margin: 10px auto;
        }

        .box {
            height: 300px;
            width: 980px;
            background-color: cornflowerblue;
            margin: 10px auto;
        }

        .box>div {
            width: 237px;
            height: 300px;
            background-color: darkkhaki;
            float: left;
            margin-right: 10px;
        }

        #last {
            margin-right: 0;
        }

        .footer {
            height: 200px;
            background-color: darkslateblue;
            margin-top: 10px;
        }
    </style>
</head>

<body>
    <div class="top"></div>
    <div class="banner"></div>
    <div class="box">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div id="last">4</div>
    </div>
    <div class="footer"></div>
</body>

</html>